package com.wing.wcabinet.model.response;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import com.wing.wcabinet.model.entity.WcabUseInventoryInout;

/**
 * 售刀柜领取/暂存柜上/暂存/维修/回收VO
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class WcabUseInventoryInoutVO {

    /**
     * ID
     */
    private Long id;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime createTime;

    /**
     * 创建者
     */
    private Long creator;

    /**
     * 修改者
     */
    private Long modifier;

    /**
     * 创建人
     */
    private String creatorName;

    /**
     * 修改人
     */
    private String modifierName;

    /**
     * 存/取刀任务编号
     */
    private String code;

    /**
     * 售刀柜领取/暂存柜上/暂存/维修/回收业务id
     */
    private Long businessId;

    /**
     * 操作类型
     */
    private WcabUseInventoryInout.InoutType inoutType;

    /**
    * 操作类型描述
    */
    @TableField(exist = false)
    private String inoutTypeDesc;

    public String getInoutTypeDesc() {
        return inoutType.getDesc();
    }

    /**
     * no
     */
    private Integer no;

    /**
     * day
     */
    private Integer day;

    /**
     * 业务类型
     */
    private WcabUseInventoryInout.BusinessType businessType;

    /**
    * 业务类型描述
    */
    @TableField(exist = false)
    private String businessTypeDesc;

    public String getBusinessTypeDesc() {
        return businessType.getDesc();
    }

    /**
     * 设备编号
     */
    private String deviceCode;

    /**
     * orderCode
     */
    private String orderCode;

    /**
     * cellInventoryInoutId
     */
    private Long cellInventoryInoutId;

    /**
     * 工序id
     */
    private Long processId;

    /**
     * 计划id
     */
    private Long planId;

    /**
     * enterpriseId
     */
    private Long enterpriseId;

    /**
     * enterpriseCode
     */
    private String enterpriseCode;

    private WcabUseInventoryInout.OperationType operationType;

    @TableField(exist = false)
    private String operationTypeDesc;

    public String getOperationTypeDesc(){
        if (operationType!=null){
            return operationType.getDesc();
        }
        return "";
    }

    private WcabUseInventoryInout.Type type;
}
